{ "type" : "object", "$schema" : "http://json-schema.org/draft-03/schema#", "description" : "This JSON file contains extract Orders that are sent to the warehouse", "properties" : { "identifier" : { "type" : "integer", "required" : true, "description" : "Unique identifier for each file that is produced or processed by CMP" }, "version" : { "type" : "number", "required" : true, "description" : "The current version of the generic extract file. This must match the corresponding outbound file.", "maximum" : 1.1, "minimum" : 1.1 }, "interfaceCategory" : { "type" : "string", "required" : true, "description" : "CMP categorisation of the job associated with this file", "enum" : [ "Sales Order" ] }, "interfaceType" : { "type" : "string", "required" : true, "description" : "Sub-categorisation of the job", "enum" : [ "Sales Order Request" ] }, "batchDateTime" : { "type" : "string", "required" : true, "description" : "Represents when a batch was created in CMP", "format" : "date-time" }, "extractLoadDateTime" : { "type" : "string", "required" : true, "description" : "Timestamp indicating when the generic extract file was created.", "format" : "date-time" }, "recordCount" : { "type" : "integer", "required" : true, "description" : "Total number of transaction records in the extract file. " }, "orders" : { "type" : "array", "items" : { "type" : "object", "properties" : { "id" : { "type" : "string", "required" : true, "description" : "The unique identifier of the order in CMP e.g. CMP Order Number" }, "deliveryInstructions" : { "type" : "string", "description" : "The delivery instructions that are on the order" }, "accountId" : { "type" : "integer", "required" : true, "description" : "The unique identifier of the CMP account that the order is associated with." }, "deliveryMethod" : { "type" : "object", "required" : true, "properties" : { "id" : { "type" : "string", "required" : true, "description" : "An identifier of the delivery method that indicates how this order is to be delivered" }, "description" : { "type" : "string", "required" : true, "description" : "A description of the delivery method" } } }, "typeOfPayment" : { "type" : "string", "required" : true, "description" : "Indicates how Payment will be made" }, "promisedDate" : { "type" : "string", "description" : "Indicates a date that the user was promised that the order would be delivered by", "format" : "date-time" }, "postalAddress" : { "type" : "object", "description" : "Postal address information", "properties" : { "title" : { "type" : "string", "description" : "Title by which a subscription wishes to be referred to as", "maxLength" : 10 }, "foreName" : { "type" : "string", "description" : "First name of a subscription", "maxLength" : 50, "minLength" : 15 }, "middleName" : { "type" : "string", "description" : "Middle name of a subscription", "maxLength" : 20, "minLength" : 10 }, "surname" : { "type" : "string", "description" : "Surname of a subscription", "maxLength" : 50, "minLength" : 25 }, "companyName" : { "type" : "string", "description" : "Actual name of a company", "maxLength" : 30 }, "companyRegistrationNumber" : { "type" : "string", "description" : "Registration Number of the company", "maxLength" : 25 }, "postCode" : { "type" : "string", "description" : "Post Code of a subscription", "maxLength" : 10 }, "addressLines" : { "type" : "array", "description" : "Address Line Information", "items" : { "type" : "object", "properties" : { "line" : { "type" : "string", "description" : "Address of a particular subscription. Address line 1 is mandatory, rest are optional", "maxLength" : 60, "minLength" : 40 } } }, "maxItems" : 5 } } }, "contactDetails" : { "type" : "object", "properties" : { "telephoneNumber" : { "type" : "string", "description" : "Primary contact number for the order", "maxLength" : 15 }, "telephoneNumber2" : { "type" : "string", "description" : "Secondary contact number for the order", "maxLength" : 15 } } }, "fraudCheckRequired" : { "type" : "string", "description" : "This property indicates if a fraud check needs to be performed for orders raised from CMP.", "maxLength" : 3 }, "orderLine" : { "type" : "array", "items" : { "type" : "object", "properties" : { "product" : { "type" : "object", "required" : true, "properties" : { "id" : { "type" : "string", "required" : true, "description" : "This is a code that uniquely identifies the product" }, "description" : { "type" : "string", "required" : true, "description" : "This is the description of the product" } } }, "activationType" : { "type" : "string", "required" : true, "description" : "This is the mechanism of activation of the device if relevant." }, "category" : { "type" : "object", "required" : true, "properties" : { "id" : { "type" : "string", "required" : true }, "description" : { "type" : "string", "required" : true } } }, "orderLineItem" : { "type" : "array", "items" : { "type" : "object", "properties" : { "orderFulfilmentId" : { "type" : "number", "required" : true, "description" : "This is a unique number that uniquely identifies the line. It is unique across all orders." }, "uniqueOrderWarehouseLineNumber" : { "type" : "number", "description" : "This uniquely identifies the line per warehouse within an order." }, "quantity" : { "type" : "integer", "required" : true, "description" : "This is quantity of items that this lie refers to. If its Subscription Related or if the isSerialized flag is set to true against the Item code then the quantity here will always be 1." }, "externalItemRef" : { "type" : "string", "required" : true, "description" : "This is the reference for the item that the warehouse identifies the item by" }, "unitPrice" : { "type" : "number", "description" : "This is the price per item" }, "item" : { "type" : "object", "required" : true, "properties" : { "id" : { "type" : "string", "required" : true, "description" : "This is the identifier of the item." }, "description" : { "type" : "string", "required" : true, "description" : "This is a description of the item" } } } } } } } } }, "warehouse" : { "type" : "object", "properties" : { "id" : { "type" : "string", "required" : true, "description" : "The unique code for the warehouse" }, "description" : { "type" : "string", "required" : true, "description" : "The description of the unique code for the warehouse" } } }, "customerReference" : { "type" : "string", "description" : "An optional customer reference that can be associated with the order." } } } } } }